package 抽象工厂模式;

public class FactoryProducer {
      public static MaxFactory getFactory(Class type){
        if (type.getTypeName().equals("抽象工厂模式.ShapeFactory")){
            return new ShapeFactory();
        }else if (type.getTypeName().equals("抽象工厂模式.ColorFactory")){
            return new ColorFactory();
        }
        return null;
    }
}
